package com.hoopchina.ui.home;

import java.util.logging.Logger;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.hoopchina.news.R;
import com.hoopchina.ui.main.UIWidget;

/**
 * HomeSearchBar
 * home版块的搜索栏
 * 
 *@author Neusoft
 */
public class HomeSearchBar extends UIWidget{
	private TextView mTextView;
	
    // constructor
	public HomeSearchBar(Context context) {
		super(context);
		
	}

    // constructor
	public HomeSearchBar(Context context, AttributeSet attrs) {
		super(context, attrs);
	}
	public void setTextVisibility(int visibility){
		if (visibility==View.INVISIBLE) {
			mTextView.setHeight(3);
		}else {
			mTextView.setHeight(23);
		}
		
	}
	/**
	 * 加载搜索ui资源
	 */
	@Override
	protected void loadResources() {
		LayoutInflater inflater = 
				( LayoutInflater )getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
			inflater.inflate( R.layout.homesearchbar, this, true );
			mTextView=(TextView) findViewById(R.id.textViewHomeSearchBar);
			
	}

}
